package com.weilele.mvvm.widget

import android.content.Context
import android.util.AttributeSet
import com.airbnb.lottie.LottieAnimationView

open class BaseLottieAnimationView : LottieAnimationView {
    constructor(context: Context?) : super(context)
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)

    fun setAnimUrl(url: String?, cacheKey: String? = null) {
        url ?: return
        setAnimationFromUrl(url, cacheKey)
    }
}